import Vue from 'vue'

import 'normalize.css/normalize.css' // 浏览器样式统一

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // 多语言

import '@/styles/index.scss' // 全局css

import App from './App'
import store from './store'
import router from './router'
import Icon from '@/components/Icon/index'

import '@/icons' // 图标
import '@/permission' // 权限控制

// 导入字体图标
import '@/assets/iconfont/iconfont.js'
import '@/assets/iconfont/iconfont.css'

if (process.env.NODE_ENV === 'production') {
  const { mockXHR } = require('../mock')
  mockXHR()
}
Vue.use(Icon)
Vue.use(ElementUI, { size: 'small' })
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
